package com.example.hyw.szysteam.POJO;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by HYW on 2018/7/9.
 */

public class Review implements Parcelable{
    private int id;
    private String question;
    private String answer;
    private String myAnswer;
    private int collect;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public String getMyAnswer() {
        return myAnswer;
    }

    public void setMyAnswer(String myAnswer) {
        this.myAnswer = myAnswer;
    }

    public int getCollect() {
        return collect;
    }

    public void setCollect(int collect) {
        this.collect = collect;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(id);
        parcel.writeString(question);
        parcel.writeString(answer);
        parcel.writeString(myAnswer);
        parcel.writeInt(collect);
    }

    public static final Parcelable.Creator<Review> CREATOR=new Creator<Review>() {
        @Override
        public Review createFromParcel(Parcel parcel) {
            Review r=new Review();
            r.setId(parcel.readInt());
            r.setQuestion(parcel.readString());
            r.setAnswer(parcel.readString());
            r.setMyAnswer(parcel.readString());
            r.setCollect(parcel.readInt());
            return r;
        }

        @Override
        public Review[] newArray(int i) {
            return new Review[0];
        }
    };
}
